package com.d.business.dao;

import com.d.business.domain.BDingTalkDO;
import com.d.business.domain.dto.BDingTalkDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;
import java.util.Map;

/**
 * 钉钉审批关联表
 * @author wang
 * @email wangfst@foxmail.com
 * @date 2024-03-25 10:53:34
 */
@Mapper
public interface BDingTalkDao {

	BDingTalkDO get(Integer id);

	List<BDingTalkDO> list(Map<String,Object> map);

	int count(Map<String,Object> map);

	int save(BDingTalkDO bDingTalk);

	int update(BDingTalkDO bDingTalk);

	int remove(Integer id);

    List<BDingTalkDTO> selectListByTypeAndValid(Integer type);

	BDingTalkDTO getById(Integer id);

    void updateDingTalkStatusBySourceIdsAndType(@Param("sourceIds") String sourceIds, @Param("type")Integer type, @Param("status")Integer status, @Param("msg")String msg,
												@Param("instanceId")String instanceId);

    BDingTalkDTO getByInstanceIdAndType(@Param("instanceId")String instanceId, @Param("type")int type);
}
